if whichItem is in "First,Prev,Next,Last,Recent,Back,Find..." or last word of whichItem is "Info..." or first word of whichItem is "Print" then
if (cd fld "locked" of cd 1) is "locked" then
get item (random(6)) of menuPhrases
answer it with "Sorry."
else
pass doMenu
end if
else
if first word of whichItem is in "Paste,Delete,Cut,Copy,New,Background" then
answer "Changing the stack might destroy the links in the game and " &"render it unplayable." with "Risk It" or "Cancel"
if it is not "Cancel" then
pass doMenu
else
exit doMenu
end if
else
if WhichItem is "Quit HyperCard" then
put the userLevel into tempULevel
set userLevel to 5
if the freesize of this stack > 2000 and the diskspace > the size of this stack then
Answer "Turn up corners, remove markers, and compress book?" with "Compact" or "Next time" or "Cancel"
If it is "Compact" then
if cantmodify of this stack is false then
if short name of this bg is "Location" then
visual scroll left
else
visual wipe right
end if
go cd 1
lock screen
show cd fld "GoodbyeNote"
unlock screen with dissolve
doMenu "Compact Stack"
lock screen
hide cd fld "GoodbyeNote"
unlock screen with dissolve
else
show menuBar
answer "The Cantmodify of this stack is set to true," &" so compacting is impossible at this time. Next session?" with "OK"
end if
end if
if it is "Cancel" then
exit doMenu
end if
set userLevel to TempULevel
end if
end if
pass doMenu
end if
end if
end doMenu
on openStack
global Stacks,GVMLoc
global CardWord,ActionWord,Action1,Object2,tryCounter
global InvList,TakeTemp,ItemList,CardList,MenuPhrases
put empty into InvList
put loc of msg into GVMLoc
cleanScreen
if the version < 1.2 then
Answer "Hypercard version 1.2, or later, is available at your " &"Apple dealer. Many functions of this stack require the new " &"features. Continue?" with "Risk It" or "Go Home"
if it is "Go Home" then
go home
exit openStack
end if
end if
set cursor to 3
if stacks is empty then
CheckGlobals
end if
About " ","If Monks Had Macs..."
set userLevel to 5
put "CardWord,ActionWord,Action1,Object2,tryCounter," &"InvList,TakeTemp,ItemList,CardList" into ClearList
repeat with i = 1 to number of items of ClearList
get item i of clearList
do "put empty into " &it
end repeat
hide tool window
set blindTyping to false
set powerKeys to false
choose browse tool
visual wipe right
go cd 1
put "Cheaters never prosper.,That isn't possible at this time.," &"Can't do that for you.,The answers aren't in the menuBar.," &"The solution to the puzzle is in one or more buttons on the card.," &"Navigate using the buttons on the cards only." into MenuPhrases
end openStack
on CheckGlobals
global GULevel,GPKeys,GTArrows
global GVPatn,GBTyping,GVMsg,GVTool
getHomeInfo
put the userLevel into GULevel
put the powerKeys Into GPKeys
put the textArrows into GTArrows
put the blindTyping into GBTyping
put the visible of the msg into GVMsg
put the visible of tool window into GVTool
put the visible of pattern window into GVPatn
end CheckGlobals
on closeStack
global GULevel,GPKeys,GTArrows
Global GVPatn,GBTyping,GVMLoc,GVMsg,GVTool
global CardWord,ActionWord,Action1,Object2,tryCounter
global InvList,TakeTemp,ItemList,CardList,DropG,MenuPhrases
cleanScreen
set cursor to 3
if GULevel is empty then
CheckGlobals
end if
set the userLevel to GULevel
set the powerKeys to GPKeys
set the textArrows to GTArrows
set the blindTyping to GBTyping
set the loc of msg to GVMLoc
set the visible of the msg to GVMsg
set the visible of tool window to GVTool
set the visible of pattern window to GVPatn
put "CardWord,ActionWord,Action1,Object2,tryCounter," &"InvList,TakeTemp,ItemList,CardList" into ClearList
repeat with i = 1 to number of items of ClearList
get item i of clearList
do "put empty into " &it
end repeat
if DropG is not empty then
repeat with i = 1 to number of cds of bg "location"
if (bg fld "Dropped" of cd i of bg "location") is not empty then
put empty into bg fld "Dropped" of cd i of bg "location"
end if
end repeat
end if
put empty into MenuPhrases
about
end closeStack
on edit
if (cd fld "locked" of cd 1) is "locked" then
else
pass edit
end if
end edit
on sort
answer "You do not want to sort this stack!!!!" with "Right!!!"
end sort
on show
if (cd fld "locked" of cd 1) is "locked" then
put msg into temp
get last word of msg
if first word of temp is "Show" then
if it is "cards" or it is "cds" or it is "card" or it is "cd" then
put empty
hide msg
answer "That's cheating." with "Sorry."
cleanScreen
exit show
else
pass show
end if
else
pass show
end if
else
pass show
end if
end show
-- Designed by Brian Thomas
-- Scripted by Phillip A. Mohr, Jr.
-- The list of people who deserve thanks (or blame) for the scripts
-- in this stack would have to include everyone whose work is represented
-- in my collection of HyperCard stacks. Since I haven't yet written the
-- script that will extract a list of the names of those authors, I'll
-- just offer a blanket thank you to those who see something that looks
-- familiar.
-- Send comments to either:
-- Philip A. Mohr, Jr, 4405 N. Rosemead Blvd., #119, Rosemead, CA 91770,
-- or Brian Thomas,
-- Meat and Conversation created and copyrighted 1988-1989
-- If this stack is used as the basis for another game, all we
-- expect as recompense is a that a copy of your completed stack
-- be posted on one or more of the major PD distribution services